package com.pany.rememberpass.Adapter;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.LinearLayout;

import androidx.annotation.Nullable;

/**
 * @name： RememberPass
 * @author： zs
 * @time： 2022/5/20 0020
 */
public class MyLinearLayout extends LinearLayout {
    private float lastx;
    private MyLinearLayout oterLinearLayout;

    public MyLinearLayout(Context context) {
        super(context);
    }

    public MyLinearLayout(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public MyLinearLayout(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    public void setOterLinearLayout(MyLinearLayout oterLinearLayout) {
        this.oterLinearLayout = oterLinearLayout;
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent ev) {
        if (oterLinearLayout != null) {
            oterLinearLayout.fakeTouchEvent(ev);
        }

        return super.dispatchTouchEvent(ev);
    }

    private void fakeTouchEvent(MotionEvent ev) {
        super.dispatchTouchEvent(ev);
    }
}
